﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Talento21.Pages.Trabajador
{
    public partial class CrearCargo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
        {
            if (e.Exception == null)
            {
                Master.AgregarMensaje("Se creo un nuevo cargo con exito");
                Server.Transfer("Cargos.aspx");
            }
        }

        protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
        {
            e.Values.Add("Emp_Rut", (int) Session["Emp_Rut"]);
        }
    }
}